import request from '@/utils/request'

export function tbDeptQuery(data) {
  //查询
  return request({
    method: 'get',
    url: 'tbSysDept/query',
    params: data,
  })
}

export function tbDeptQueryById(data) {
  //查询
  return request({
    method: 'get',
    url: 'tbSysDept/query/' + data,
  })
}

export function tbDeptQueryParentList(id) {
  //查询上级部门
  return request({
    method: 'get',
    url: 'tbSysDept/queryParentList/' + id,
  })
}

export function tbDeptAdd(data) {
  return request({
    method: 'post',
    url: 'tbSysDept/add',
    data,
  })
}

export function tbDeptUpdate(data) {
  return request({
    method: 'post',
    url: 'tbSysDept/update',
    data,
  })
}

export function tbDeptDelete(data) {
  return request({
    method: 'post',
    url: 'tbSysDept/delete/' + data,
  })
}
